@extends('layouts.app')

@section('content')
   <div class="container">
       <div class="row">
           <div class="col-md-12">
               <ul class="type-nav">
                   @foreach($types as $type)
                   <li><a href="/venue/type/{{$type->id}}">{{$type->name}}</a> </li>
                   @endforeach
               </ul>
           </div>
       </div>
       <div class="row">
           <div class="col-md-9">
               @foreach($venues as $venue)
               <div class="row venue-item">

                   <div class="col-md-4">
                       <img src="/images/lanqiu_01.jpg" class="img-responsive">
                   </div>
                   <div class="col-md-8">
                       <h3><a href="/venue/detail/{{$venue->id}}">{{$venue->name}}</a> </h3>
                       <p>{{$venue->des}}</p>

                       @if($venue->is_followed())
                           <a href="/venue/unfollow/{{$venue->id}}">取消关注</a>
                       @else
                           <a href="/venue/follow/{{$venue->id}}">关注</a>
                       @endif
                   </div>
               </div>
               @endforeach

               {{$venues->links()}}
           </div>
           <div class="col-md-3">
               <div class="sidebar">
                   <h3>推荐场馆</h3>
                   <div class="tj-venue">
                       <div class="img-demo"></div>
                       <p>首都乒乓球俱乐部</p>
                   </div>
                   <div class="tj-venue">
                       <div class="img-demo"></div>
                       <p>首都乒乓球俱乐部</p>
                   </div>
                   <div class="tj-venue">
                       <div class="img-demo"></div>
                       <p>首都乒乓球俱乐部</p>
                   </div>
               </div>
           </div>
       </div>
   </div>
@endsection
